<?PHP

class mvSettings{

	static $settings 	= array();

	public static function __set_state($a){
		self::$settings = $a['settings'];
	}

	public static function save($file){
		$output = "<?PHP \n";

		// Settings output
		$a = new mvSettings;
		$a->settings = self::$settings;
		$output .= "if(class_exists('mvSettings')) " . var_export($a, true) . "; \n?>";

		file_put_contents($file, $output);
	}

	public static function get($var, $default = false){
		if(isset(self::$settings[$var]))
			return self::$settings[$var];

		return $default;
	}

	public static function set($var, $value){
		self::$settings[$var] = $value;
	}

}

?>